<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	template="/xhtml/bases/advertisementNewBase.xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:t="http://myfaces.apache.org/tomahawk">
	
	<!-- defining the scope of accountbase -->
	<ui:define name="accountHeader">
		<h:outputText value="#{msg.userAccountMyAdvertisements} #{msg.privateAreaFormSeparatorHeader} #{msg.privateAreaActionView}"/>
	</ui:define>
	
	<!-- defining the scope of advertisementNewBase -->
	<ui:define name="advertisementFormBody">
		
		<h:panelGroup styleClass="boxUserAccountForm boxAdvertisementGroupTabs" layout="block">
			<h:panelGrid columns="2">
				<h:commandLink value="#{msg.advertisementTabData}"
					action="#{advertisementBean.consultTabData}"
					styleClass="#{advertisementBean.selectedTab eq 'dataTab' ? 'boxAdvertisementGroupTabsSelected' : 'boxAdvertisementGroupTabsUnselected'}"
					onclick="popupLoading(true);"/>
				<h:commandLink value="#{msg.advertisementTabImages}"
					action="#{advertisementBean.consultTabPictures}"
					styleClass="#{advertisementBean.selectedTab eq 'picturesTab' ? 'boxAdvertisementGroupTabsSelected' : 'boxAdvertisementGroupTabsUnselected'}"
					onclick="popupLoading(true);"/>
			</h:panelGrid>
		</h:panelGroup>
		
		<h:panelGroup styleClass="boxUserAccountForm boxUserAccountFormInputs" layout="block">
				
				<ui:insert name="tabFormContent"/>
			
		</h:panelGroup>

	</ui:define>

	<ui:define name="accountBottomButtons">
		<h:commandButton value="#{msg.privateAreaActionEdit}" styleClass="customButton2 buttonMainForm" action="#{advertisementBean.edit}" immediate="false" />
		<a href="#{request.contextPath}/xhtml/public/advertisementConsult.jsf?q=#{advertisementBean.advertisement.id}"
			class="customButton2 buttonMainForm">
			
			<h:outputText value="#{msg.advertisementViewPublic}" />
		</a>
		<h:commandButton value="#{msg.privateAreaActionCancel}" styleClass="customButton2 buttonMainForm" action="#{advertisementBean.list}" immediate="true"/>
	</ui:define>
	
</ui:composition>
